/**
 * create by young (young2f@outlook.com) on 2020/8/16
 */
'use strict';
export default {
  'POST /api/tree/node/all': (req, res) => {
    console.log('mock', req.route.path, req.body);
    res.send( [{
        "id": 18,
        "_id": "87C92051E7",
        "table": "deviceDrive",
        "level": 0,
        "name": "",
        "title": {"label": "原材料", "color": "#0062b1"},
        "code": "",
        "path": "/",
        "idPath": "/",
        "desc": "",
        "fatherId": "",
        "childrenIds": ["BD571FAF06", "F6F76A0DCD", "231FA644AD"],
        "dataId": "",
        "createTs": 1590206527650,
        "createUser": "test_usr",
        "updateTs": 1594108523727,
        "createdAt": "2020-05-23T04:02:07.656Z",
        "updatedAt": "2020-07-07T07:55:23.727Z",
        "children": [{
          "id": 19,
          "_id": "BD571FAF06",
          "table": "deviceDrive",
          "level": 1,
          "name": "",
          "title": {"label": "金属件", "color": "#0c797d"},
          "code": "",
          "path": "/ 原材料/",
          "idPath": "/87C92051E7/",
          "desc": "",
          "fatherId": "87C92051E7",
          "childrenIds": ["C28D517F34"],
          "dataId": "",
          "createTs": 1590206541422,
          "createUser": "test_usr",
          "updateTs": 1590541234299,
          "createdAt": "2020-05-23T04:02:21.425Z",
          "updatedAt": "2020-05-27T01:00:34.300Z",
          "children": [{
            "id": 32,
            "_id": "C28D517F34",
            "table": "deviceDrive",
            "level": 2,
            "name": "",
            "title": {"label": "铁管", "color": "#194d33"},
            "code": "",
            "path": "/ 原材料/ 金属件/",
            "idPath": "/87C92051E7/BD571FAF06/",
            "desc": "",
            "fatherId": "BD571FAF06",
            "childrenIds": "",
            "dataId": "",
            "createTs": 1590541234269,
            "createUser": "test_usr",
            "updateTs": 1590541252568,
            "createdAt": "2020-05-27T01:00:34.276Z",
            "updatedAt": "2020-05-27T01:00:52.568Z",
            "children": []
          }]
        }, {
          "id": 41,
          "_id": "F6F76A0DCD",
          "table": "deviceDrive",
          "level": 1,
          "name": "",
          "title": {"label": "锯切半成品", "color": "#0062b1"},
          "code": "",
          "path": "/ 原材料/",
          "idPath": "/87C92051E7/",
          "desc": "",
          "fatherId": "87C92051E7",
          "childrenIds": "",
          "dataId": "",
          "createTs": 1594108512366,
          "createUser": "test_usr",
          "updateTs": "",
          "createdAt": "2020-07-07T07:55:12.375Z",
          "updatedAt": "2020-07-07T07:55:12.375Z",
          "children": []
        }, {
          "id": 34,
          "_id": "231FA644AD",
          "table": "deviceDrive",
          "level": 1,
          "name": "",
          "title": {"label": "加热半成品", "color": "#0062b1"},
          "code": "",
          "path": "//",
          "idPath": "/87C92051E7/",
          "desc": "",
          "fatherId": "87C92051E7",
          "childrenIds": "",
          "dataId": "",
          "createTs": 1590542199028,
          "createUser": "test_usr",
          "updateTs": 1594108523745,
          "createdAt": "2020-05-27T01:16:39.033Z",
          "updatedAt": "2020-07-07T07:55:23.745Z",
          "children": []
        }]
      }, {
        "id": 22,
        "_id": "50E872AFB2",
        "table": "deviceDrive",
        "level": 0,
        "name": "",
        "title": {"label": "半成品", "color": "#009ce0"},
        "code": "",
        "path": "/",
        "idPath": "/",
        "desc": "",
        "fatherId": "",
        "childrenIds": ["62ACDCCDB5", "2D5C3B0B2D", "33EF8DA140"],
        "dataId": "",
        "createTs": 1590249079759,
        "createUser": "test_usr",
        "updateTs": 1594108538827,
        "createdAt": "2020-05-23T15:51:19.763Z",
        "updatedAt": "2020-07-07T07:55:38.827Z",
        "children": [{
          "id": 33,
          "_id": "62ACDCCDB5",
          "table": "deviceDrive",
          "level": 1,
          "name": "",
          "title": {"label": "锯切半成品", "color": "#0062b1"},
          "code": "",
          "path": "/ 半成品/",
          "idPath": "/50E872AFB2/",
          "desc": "",
          "fatherId": "50E872AFB2",
          "childrenIds": "",
          "dataId": "",
          "createTs": 1590542181026,
          "createUser": "test_usr",
          "updateTs": 1590542250432,
          "createdAt": "2020-05-27T01:16:21.030Z",
          "updatedAt": "2020-05-27T01:17:30.433Z",
          "children": []
        }, {
          "id": 35,
          "_id": "2D5C3B0B2D",
          "table": "deviceDrive",
          "level": 1,
          "name": "",
          "title": {"label": "锻打半成品", "color": "#0062b1"},
          "code": "",
          "path": "/ 半成品/",
          "idPath": "/50E872AFB2/",
          "desc": "",
          "fatherId": "50E872AFB2",
          "childrenIds": "",
          "dataId": "",
          "createTs": 1590542222325,
          "createUser": "test_usr",
          "updateTs": 1590542260747,
          "createdAt": "2020-05-27T01:17:02.329Z",
          "updatedAt": "2020-05-27T01:17:40.747Z",
          "children": []
        }, {
          "id": 42,
          "_id": "33EF8DA140",
          "table": "deviceDrive",
          "level": 1,
          "name": "ddd",
          "title": {"label": "sss", "color": "#aea1ff"},
          "code": "",
          "path": "/ 半成品/",
          "idPath": "/50E872AFB2/",
          "desc": "",
          "fatherId": "50E872AFB2",
          "childrenIds": "",
          "dataId": "",
          "createTs": 1594108538814,
          "createUser": "test_usr",
          "updateTs": "",
          "createdAt": "2020-07-07T07:55:38.817Z",
          "updatedAt": "2020-07-07T07:55:38.817Z",
          "children": []
        }]
      }, {
        "id": 43,
        "_id": "BE48C49080",
        "table": "deviceDrive",
        "level": 0,
        "name": "1",
        "title": {"label": "原材料仓", "color": "#a4dd00"},
        "code": "",
        "path": "/",
        "idPath": "/",
        "desc": "",
        "fatherId": "",
        "childrenIds": "",
        "dataId": "",
        "createTs": 1594108554270,
        "createUser": "test_usr",
        "updateTs": "",
        "createdAt": "2020-07-07T07:55:54.274Z",
        "updatedAt": "2020-07-07T07:55:54.274Z",
        "children": []
      }]
    );
  },
  'POST /api/tree/info/find/byId': (req, res) => {
    console.log('mock', req.route.path, req.body);
    res.send({"node":{"id":18,"_id":"87C92051E7","table":"materialType","level":0,"name":"","title":{"label":"原材料","color":"#0062b1"},"code":"","path":"/","idPath":"/","desc":"","fatherId":"","childrenIds":["BD571FAF06","F6F76A0DCD","231FA644AD"],"dataId":"","createTs":1590206527650,"createUser":"test_usr","updateTs":1594108523727,"createdAt":"2020-05-23T04:02:07.656Z","updatedAt":"2020-07-07T07:55:23.727Z","children":[null,null,null]},"nodeId":"87C92051E7"})
}}
